<?php
/**
 * @version $Id: sketchup.php,v 1.4 2009/06/04 20:13:37 dgravato Exp $
 * @package    sketchup
 * @subpackage 

 * @author     Chris Borkowski {@link http://www.guggenheim.org}
 * @author     Created on 07-April-2009
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once( JPATH_COMPONENT.DS.'controller.php' );

require_once( JPATH_COMPONENT.DS.'classes'.DS.'sketchup.helper.php');
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS. 'components'.DS.$option.DS.'tables');
$document =& JFactory::getDocument();
$css =JURI::base() .'components/com_sketchup/assets/css/sketchup.css';
$document ->addStyleSheet ($css);
 
 // Create the controller
if($controller = JRequest::getWord('controller')) {
    $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
    if (file_exists($path)) {
        require_once $path;
    } else {
        $controller = '';
    }
}

$classname = 'SketchupController'.$controller;
$controller = new $classname();

$controller->execute( JRequest::getVar( 'task' ) ); 
$controller->redirect(); 

?> 
